<!-- 面板 -->
<template>
	<view class="m-panel-wrapper">
		<view class="m-panel-title" v-if="isTitle">{{ title }}</view>
		<view class="m-panel-content"><slot></slot></view>
	</view>
</template>

<script>
/**
 * 自定义面板
 */
export default {
	name: 'MPanel',
	props: {
		/**
		 * 面板标题
		 */
		title: {
			type: String,
			default: '面板标题'
		},
		/**
		 * 是否显示标题
		 */
		isTitle: {
			type: Boolean,
			default: true
		}
	},
	mounted() {
		//...
	}
};
</script>
<style lang="scss" scoped>
.m-panel-wrapper {
	text-align: left;
	line-height: initial;
	.m-panel-title {
		color: rgba(69, 90, 100, 0.6);
		font-weight: normal;
		font-size: 1em;
		position: relative;
		padding: 0upx 10upx;
	}
	.m-panel-content {
		padding: 10upx 10upx;
	}
}
</style>
